<%@ page import="model.User" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>	
<!DOCTYPE html>
<%! User user = null; %>
<%
	user = ((User) request.getSession().getAttribute("user"));
	if (user == null) response.sendRedirect("/");
%>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>电子公文传输系统</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath }/statics/css/style.css" />
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath }/statics/css/public.css" />
</head>
<body>
<!--头部-->
    <header class="publicHeader">
        <h1>电子公文传输系统</h1>
        <div class="publicHeaderR">
            <p><span style="color: #fff21b"><%=user.getName()%></span> , 欢迎你！</p>
            <a href="${pageContext.request.contextPath }/logout">退出</a>
        </div>
    </header>
<!--时间-->
    <section class="publicTime">
        <span id="time">2021年1月1日 11:11  星期一</span>
    </section>
 <!--主体内容-->
 <section class="publicMian ">
     <div class="left">
         <h2 class="leftH2"><span class="span1"></span>功能列表 <span></span></h2>
         <nav>
             <ul class="list">
              <li><a href="${pageContext.request.contextPath }/send">发送公文</a></li>
                 <c:if test="${user.level == '绝密级' }">
                     <li><a href="${pageContext.request.contextPath }/level">用户授权</a></li>
                 </c:if>
                 <c:choose>
                     <c:when test="${count == 0}">
                         <li><a href="${pageContext.request.contextPath }/list">收件箱</a></li>
                     </c:when>
                     <c:otherwise>
                         <li><a href="${pageContext.request.contextPath }/list">收件箱(${count })</a></li>
                     </c:otherwise>
                 </c:choose>
              <li><a href="${pageContext.request.contextPath }/share">公文共享</a></li>
              <li><a href="${pageContext.request.contextPath }/logout">退出系统</a></li>
             </ul>
         </nav>
     </div>
     <input type="hidden" id="path" name="path" value="${pageContext.request.contextPath }"/>
     <input type="hidden" id="referer" name="referer" value="<%=request.getHeader("Referer")%>"/>